class Person:
    def __init__(self,name,weight):
        self.name=name
        self.weight=weight
    def __str__(self):
        return f'{self.name}的体重是{self.weight}'
    def run(self):
        self.weight-=0.5
    def eat(self):
        self.weight+=0.5
xiaoming=Person('xiaoming',85)
print(xiaoming)
xiaoming.run()
print(xiaoming)
xiaoming.eat()
print(xiaoming)
2


